public class Test {
    public static void swap(int a,int b) {
        int t = a;
        a = b;
        b = t;
    }
    public static void main(String[] args) {
        int a = 1;
        int b = 2;

        swap(a,b);
        System.out.println(a);
        System.out.println(b);
    }
}
